#pragma once
#ifndef _LPE_RESMAN_DATASOURCEMANAGER_H_
#define _LPE_RESMAN_DATASOURCEMANAGER_H_

#include "core/core_utils.h"
#include "boost/unordered_map.hpp"

namespace glog{
	class CGlobalLog;
}

namespace lpe{
	namespace resman{

		class CVirtualFileSystem;

		class DatasourceManager{
		private:
			/// el appender del resource manager.
			std::string RESMAN_APP;
			/// Componente log para anotaciones sobre el proceso.
			glog::CGlobalLog* m_log;
			boost::unordered_map<std::string, lpe::resman::CVirtualFileSystem*> m_datasources;

		public:
			DatasourceManager():RESMAN_APP("[RESMAN]"){}
			~DatasourceManager();
			void initFromXMLFile(const std::string& configFile);
			void initFromXMLFile(const std::string& configFile, const std::string& appender);
			bool addVirtualFileSystem(CVirtualFileSystem* vfs, const std::string & name);
			CVirtualFileSystem* getVirtualFileSystemByName(const std::string& name);
			bool removeVirtualFileSystemByName(const std::string& name);
		};
	};
};

#endif //_LPE_RESMAN_DATASOURCEMANAGER_H_
